<!DOCTYPE html>
<!-- 网页使用的语言 -->
<html lang="zh-CN">
    <head>
    	<base href="<%=basePath%>"/>
        <!-- 指定字符集 -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>修改图书</title>

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <script src="/static/js/jquery-2.1.0.min.js"></script>
        <script src="/static/js/bootstrap.min.js"></script>

    </head>
    <body>
        <div class="container" style="width: 400px;">
        <h3 style="text-align: center;">修改图书</h3>
        <form action="/bookupdate/" method="post" enctype="multipart/form-data">

            <input type="hidden" name="id" value="{{ book.id }}" readonly="readonly">

            <div class="form-group">
                <label for="bookname">图书名称：</label>
                <input type="text" value="{{ book.bookname }}" class="form-control" id="bookname" name="bookname"  placeholder="请输入图书名称" />
            </div>

            <div class="form-group">
            <label for="bookauthor">图书作者：</label>
            <input type="text"  value="{{ book.bookauthor }}" class="form-control" id="bookauthor" name="bookauthor"  placeholder="请输入作者" />
          </div>

            <div class="form-group">
            <label for="bookprice">图书价格：</label>
            <input type="number"  value="{{ book.bookprice }}" class="form-control" id="bookprice" name="bookprice"  placeholder="请输入价格" />
          </div>

            <div class="form-group">
            <label for="address">图书出版社：</label>
            <select name="press_id" class="form-control" id="jiguan">

                {% for press in presslist %}

                    {% if press == book.press %}
                        <option selected="selected" value="{{ press.id }}">{{ press.pressname }}</option>
                    {% else %}
                        <option value="{{ press.id }}">{{ press.pressname }}</option>
                    {% endif %}

                {% endfor %}

            </select>
        </div>

        <div class="form-group">
            <label for="bookimg">图书图片：</label>
            <input type="file" id="bookimg" name="bookimg">
            <img src="{{ book.bookimg }}" width="100px" onc>
            <input type="hidden" name="bookimgname" value="{{ book.bookimg }}">
        </div>



             <div class="form-group" style="text-align: center">
                <input class="btn btn-primary" type="submit" value="提交" />
                <input class="btn btn-default" type="reset" value="重置" />
                <input class="btn btn-default" type="button" onclick="window.history.back()" value="返回"/>
             </div>
        </form>
        </div>
    </body>
</html>